srcdir       = @srcdir@
top_builddir = @top_builddir@
top_srcdir   = @top_srcdir@

include ../Makefile.ext

SCM_CATEGORY = data

LIBFILES = data--sparse.$(SOEXT)
SCMFILES = sparse.sci

OBJECTS = data--sparse.$(OBJEXT) ctrie.$(OBJEXT) spvec.$(OBJEXT) sptab.$(OBJEXT)

GENERATED = Makefile
XCLEANFILES = data--sparse.c sparse.sci

all : $(LIBFILES) $(SCMFILES)

data--sparse.$(SOEXT) : $(OBJECTS)
	$(MODLINK) data--sparse.$(SOEXT) $(OBJECTS) $(EXT_LIBGAUCHE) $(LIBS)

$(OBJECTS): ctrie.h spvec.h sptab.h

data--sparse.c sparse.sci : sparse.scm
	$(PRECOMP) -e -P -o data--sparse $(srcdir)/sparse.scm

install : install-std

